<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>background position</title>
    <style type="text/css" media="screen">
        #text {border:1px solid #EEAEEE; width:500px; height:25px; text-indent:500px; overflow:hidden;}
    </style>
</head>
<body>
    <div id="text"></div>
    <script type="text/javascript" charset="utf-8">
        function show_text(text) {
            var a = document.getElementById('text');
            var width = a.clientWidth;
            var num = 200;
            var i = 1;
            a.innerHTML = text;
            show_slow = function () { 
                if (i <= num) {
                    a.style.textIndent = width - i * (width/num);
                    i++;
                } else {
                    clearInterval (temp);
                }
            }
            temp = setInterval( show_slow, 100);
        }
        show_text("hello world ");
    </script>
</body>
</html>
